package com.leen.admin.repository;


import com.leen.admin.entity.Menu;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import org.springframework.data.repository.query.Param;

import java.util.List;

/**
 * 类说明
 *
 * @author admin
 * @date 2021-05-11
 */
public interface MenuRepository  extends CrudRepository<Menu,Integer> {

    @Query(value = "select menu_id from sys_role_menu where role_id=:roleId",nativeQuery = true)
    List OwnMenuIdByRoleId(@Param("roleId") int roleId);
}
